<template>
    <div>
        <el-col>
            <el-button v-for="item in props.buttonList" :key="item.name" :type="item.type" :size="item.size"
                @click="item.method">
                <el-icon>
                    <Plus v-show="item.icon == IconType.plus" />
                    <Refresh v-show="item.icon == IconType.refresh" />
                    <Edit v-show="item.icon == IconType.edit" />
                    <Minus v-show="item.icon == IconType.minus" />
                </el-icon>
                {{ item.name }}
            </el-button>
        </el-col>

    </div>
</template>
<script setup lang="ts">
import { defineProps, PropType } from 'vue'

import { Edit, Minus, Plus, Refresh } from '@element-plus/icons-vue'
import ButtonInfo from '@/entity/button/ButtonInfo';
import { IconType } from '@/entity/enums/CommonType';


const props = defineProps({
    buttonList: {
        type: Array as PropType<Array<ButtonInfo>>,
        default: () => []
    }
})

</script>
<style ></style>
  